Skip to content

fix(fleet): classify GraphQL hidden-node errors as permission refusals - #12409

Merged
dezren39 merged 2 commits into
mainfrom
xaltha/fleet-gh-hidden-node
Nov 22, 2026
Merged

dezren39 merged 2 commits into
mainfrom
xaltha/fleet-gh-hidden-node

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Completes the remaining half of #12154.

PR #12157 already let GraphQL board reads fail over to the App identity (is_graphql_read), but left failure classification unchanged. classify_failure() in pkgs/fleet/crates/fleet/src/gh.rs did not recognise GitHub's Could not resolve to a node with the global id of '...' error — the refusal GitHub returns when the acting identity cannot see the node at all — so those failures were not classified as permission refusals and did not trigger the identity failover path.

This change:

  • adds could not resolve to a node to the permission-refusal patterns in classify_failure(), with a comment explaining the hidden-node case
  • adds a test case in classify_failure_recognizes_refusals asserting the GraphQL hidden-node message classifies as FailureClass::Permission

Note: the change was prepared and verified by inspection against current main; it was not compiled locally (no Rust toolchain in the sandbox), so CI is the first compile/test run.

Closes #12154


Run Proof on this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 22, 2026 04:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T16:10:26.175835Z 178dcde New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c501c4f2-4ecd-438f-8f21-6cd734f45b42
Commits

Reviewing files that changed from the base of the PR and between ebf2abf and 178dcde.

Files selected for processing: 1

  • pkgs/fleet/crates/fleet/src/gh.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e44c416ff0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread pkgs/fleet/crates/fleet/src/gh.rs Resolved
A "Could not resolve to a node" error is not a whole-operation
pre-execution refusal: GraphQL executes mutation fields serially,
so a batched mutation may already have run an earlier field (e.g.
an addComment) before a later field's node fails to resolve.
Classifying it as Permission let run_with_provider replay the
whole mutation under the next token and duplicate the part that
landed.

New FailureClass::NodeResolution: classify_failure returns it for
the hidden-node string, and may_retry repeats it only for
read-only calls, like any other failure. Permission/RateLimit
writes are unchanged. The module retry-safety comment is corrected
to match, and the classify/retry-gate tests plus a fake-gh
end-to-end test (batched mutation attempted exactly once; the
same failure on a query fails over) cover it.

Addresses the Codex review thread on #12409 (comment 4656742134).
@dezren39
dezren39 merged commit 1bd443a into main Nov 22, 2026
2 checks passed
@dezren39
dezren39 deleted the xaltha/fleet-gh-hidden-node branch November 22, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fleet gh: read-only identity fallback for GraphQL 'Could not resolve to a node' on board reads

1 participant